<template>
	<view class="class_box">
		<view class="title">回收要求</view>
		<view class="husouyq">
			<view class="cvs" v-for="(req, index) in requirements" :key="index">
				<view class="ws" :class="'is_' + (index + 1)"></view>
				<text>{{ req.text }}</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				requirements: [{
						text: '拒绝掺水'
					},
					{
						text: '拒绝掺杂'
					},
					{
						text: '不少于10KG'
					},
				],
			};
		},
		onLoad() {
			this.getGuide()
		},
		methods: {
			async getGuide() {
				let response = await this.$api.getGuide()		
				this.requirements = response.data
				console.log(this.requirements)
			},
		}
	};
</script>

<style lang="scss" scoped>
	.class_box {
		width: 750rpx;
		padding: 28rpx;

		.title {
			font-size: 32rpx;
		}

		.class_item {
			width: 694rpx;
			padding-top: 30rpx;
			justify-content: space-between;
			align-items: center;
			text-align: center;
			display: flex;

			.item_icon {
				width: 154rpx;
				border: 2px solid #ffffff;
				border-radius: 10rpx;
				overflow: hidden;

				.u-image {
					margin: 12rpx;
				}

				&.on {
					border: 2px solid #00b362;

					.name {
						color: #00b362;
					}
				}

				.name {
					width: 154rpx;
					font-size: 26rpx;
					height: 50rpx;
					display: flex;
					justify-content: space-around;
					text-align: center;
					color: #666666;
				}
			}
		}
	}

	.husouyq {
		width: 694rpx;
		justify-content: space-between;
		display: flex;

		.cvs {
			width: 33.33%;
			padding-top: 36rpx;

			text {
				width: 100%;
				text-align: center;
				padding-top: 10rpx;
				font-size: 26rpx;
				color: #666666;
				display: block;
			}

			.ws {
				width: 120rpx;
				height: 120rpx;
				background-repeat: no-repeat;
				background-size: 100% 100%;
				background-position: center;
				margin: 0 auto;

				&.is_1 {
					background-image: url(@/static/coolc/p_1.jpg);
				}

				&.is_2 {
					background-image: url(@/static/coolc/p_2.jpg);
				}

				&.is_3 {
					background-image: url(@/static/coolc/p_3.jpg);
				}
			}
		}
	}
</style>